#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "input.h"
#include "execute.h"

int
main (int argc, char** argv)
{
   
   Cmdline* curr_cmd = getCommand();

   while (1)
   {
       if(!curr_cmd->errCode) { 
          /*run execute here */
          runCommand(curr_cmd);
       }

       /* EOF encountered bail */
       if (1 == curr_cmd->exitAfter)
          return 0;

       /* clean old struct */
       destroy(curr_cmd); 

       /*get next command */
       
       curr_cmd = getCommand();
   }
   return 1;
}
